package com.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.entity.Modules;
import com.example.entity.TreeMenu;
import com.example.mapper.ModulesMapper;
import com.example.service.ModulesService;

@Service
public class ModulesSeviceImpl implements ModulesService {
	
	@Autowired
	private ModulesMapper modulesMapper;

	@Override
	public List<Modules> findAllModules() {
		// TODO Auto-generated method stub
		return modulesMapper.findAllModules();
	}

	@Override
	public List<Modules> findAll(String name) {
		// TODO Auto-generated method stub
		return modulesMapper.findAll(name);
	}

	@Override
	public List<TreeMenu> find(String roleId) {
		// TODO Auto-generated method stub
		return modulesMapper.find(roleId);
	}

	@Override
	public int addModules(Modules me) {
		// TODO Auto-generated method stub
		return modulesMapper.addModules(me);
	}

	@Override
	public int addModule(Modules me) {
		// TODO Auto-generated method stub
		return modulesMapper.addModule(me);
	}

	@Override
	public int upModules(Modules me) {
		// TODO Auto-generated method stub
		return modulesMapper.upModules(me);
	}

	@Override
	public int delModules(Integer id) {
		// TODO Auto-generated method stub
		return modulesMapper.delModules(id);
	}

	

	

}
